<?php

namespace App\Criteria\System\User;

use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;

class UserTeacherQueryCriteria implements CriteriaInterface{
    public function apply($model, RepositoryInterface $repository){
        $model=$model->leftJoin('teacher', 'users.id', '=', 'teacher.id')
                     ->select('users.id as entity_id','users.name','users.phone','users.email','users.sex','users.wx_no','teacher.*');
        return $model;
    }
}